﻿using System;

namespace Teigha.Core
{
	public class OdGiDrawable_Internal : OdGiDrawable
	{
		public OdGiDrawable_Internal(IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
		{
		}

		public override bool isPersistent()
		{
			bool result = GlobalsPINVOKE.OdGiDrawable_isPersistent(OdRxObject.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdDbStub id()
		{
			IntPtr cPtr = GlobalsPINVOKE.OdGiDrawable_id(OdRxObject.getCPtr(this));
			OdDbStub result = new OdDbStub(cPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void setGsNode(OdGsCache pGsNode)
		{
			GlobalsPINVOKE.OdGiDrawable_setGsNode(OdRxObject.getCPtr(this), OdGsCache.getCPtr(pGsNode));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override OdGsCache gsNode()
		{
			IntPtr cPtr = GlobalsPINVOKE.OdGiDrawable_gsNode(OdRxObject.getCPtr(this));
			new OdGsCache(cPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return null;
		}
	}
}
